package com.zhs.smartmall.order.model;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;


/**
 * 订单项信息
 *
 * @author zhenghuisheng
 * @since 2023-11-12
 */

@Data
@ApiModel
public class OmsOrderItem implements Serializable {
        private static final long serialVersionUID = 1L;
//===========================数据库字段================================

    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private Long id;


    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "order_id")
    private Long orderId;


    @ApiModelProperty(value = "order_sn")
    private String orderSn;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "spu_id")
    private Long spuId;


    @ApiModelProperty(value = "spu_name")
    private String spuName;

    @ApiModelProperty(value = "spu_pic")
    private String spuPic;

    @ApiModelProperty(value = "品牌")
    private String spuBrand;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "商品分类id")
    private Long categoryId;


    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "商品sku编号")
    private Long skuId;


    @ApiModelProperty(value = "商品sku名字")
    private String skuName;

    @ApiModelProperty(value = "商品sku图片")
    private String skuPic;

    @ApiModelProperty(value = "商品sku价格")
    private java.math.BigDecimal skuPrice;

    @ApiModelProperty(value = "商品购买的数量")
    private Integer skuQuantity;

    @ApiModelProperty(value = "商品销售属性组合（JSON）")
    private String skuAttrsVals;

    @ApiModelProperty(value = "商品促销分解金额")
    private java.math.BigDecimal promotionAmount;

    @ApiModelProperty(value = "优惠券优惠分解金额")
    private java.math.BigDecimal couponAmount;

    @ApiModelProperty(value = "积分优惠分解金额")
    private java.math.BigDecimal integrationAmount;

    @ApiModelProperty(value = "该商品经过优惠后的分解金额")
    private java.math.BigDecimal realAmount;

    @ApiModelProperty(value = "赠送积分")
    private Integer giftIntegration;

    @ApiModelProperty(value = "赠送成长值")
    private Integer giftGrowth;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;


    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


    @ApiModelProperty(value = "是否删除")
    private Integer isDeleted;


//===========================自定义字段=================================

}
